package com.xlh.virtualization.constant;

/**
 * 实验相关常量
 *
 * @author cheer
 */
public class ExperimentConstant {

    /**
     * 单节点
     */
    public static final int SINGLE_NODE = 1;
    /**
     * 集群
     */
    public static final int CLUSTER = 2;

    /**
     * 进入实验环境 lock 超时时间
     */
    public static final int ENTER_EXPERIMENT_TIME_OUT = 15;

    /**
     * 进入实验环境 lock 超时信息
     */
    public static final String ENTER_EXPERIMENT_LOCK_MESSAGE = "虚拟机正在创建中，请稍后刷新页面重新进入实验环境";

    /**
     * 课程与实训进入实验环境 lock key
     */
    public static final String ENTER_EXPERIMENT_KEY = "enter_experiment:u:#{userInfoHolder.userId}";

    /**
     * 考试进入实验环境 lock key
     */
    public static final String ENTER_EXPERIMENT_QUESTION_KEY = "enter_experiment:q:#{questionId}:u:#{userInfoHolder.userId}";

    /**
     * 课程镜像分配进入实验环境 lock key
     */
    public static final String ENTER_EXPERIMENT_COURSE_IMAGE_ALLOCATION_KEY = "enter_experiment:ic:#{chapterId}:u:#{userInfoHolder.userId}";

    /**
     * 实训镜像分配进入实验环境 lock key
     */
    public static final String ENTER_EXPERIMENT_TRAINING_IMAGE_ALLOCATION_KEY = "enter_experiment:it:#{trainingId}:u:#{userInfoHolder.userId}";

    /**
     * 考试镜像分配进入实验环境 lock key
     */
    public static final String ENTER_EXPERIMENT_QUESTION_IMAGE_ALLOCATION_KEY = "enter_experiment:iq:#{questionId}:u:#{userInfoHolder.userId}";

}
